<!-- 下拉菜单 高端黑-蓝字 -->
<template>
  <div id="down-menu">
    <div class="menu-box">
      <div class="down-menu-box">
        <div v-for="(item, i) in lists" :key="i"><router-link :to="item.childPath" class="menu-child">{{ item.childName }}</router-link></div>
      </div>
      <router-link :to="menuPath" class="menu-box-a"><div class="menu-span">{{ menuName }}</div></router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'down-menu',
  components: {
  },
  data () {
    return {
    }
  },
  props: ['menuName', 'lists', 'menuPath'],
  computed: {
  },
  methods: {
  }
}
</script>

<style scoped>
  .menu-box {
    position: relative;
    display: inline-block;
    float: right;
  }

  .menu-span {
    height: 50px;
    width: auto;
    text-align: center;
    color: white;
    font-size: 14px;
    line-height: 50px;
    padding: 0 15px 0 15px;
  }

  .menu-span:hover {
    background-color: #05080c;
  }

  .down-menu-box:hover + .menu-box-a > .menu-span{
    background-color: #191d21;
  }

  .down-menu-box {
    right: 0;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    margin-top: 50px;
    padding-bottom: 5px;
    padding-top: 5px;
    background-color: #191d21;
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2);
    -webkit-transition: opacity .15s,visibility 0s .15s;
    transition: opacity .15s,visibility 0s .15s;
    white-space: nowrap;
  }

  .menu-box:hover .down-menu-box {
    visibility: visible;
    opacity: 1;
  }

  .menu-child {
    width: 100%;
    color: white;
    font-size: 12px;
    text-align: left;
    padding: 7px 40px 7px 15px;
    float: left;
    font-weight: normal;
  }

  .menu-child:hover {
    color: #00c1de;
  }
</style>
